Optimal. Leaf size=41 \[ 2 \sin (x) \cos (x) (c+d x)+c x+\frac{d x^2}{2}-\frac{1}{4} d \sin ^2(x)+\frac{3}{4} d \cos ^2(x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0563706, antiderivative size = 41, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 2, integrand size = 12, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.167, Rules used = {4431, 3310} \[ 2 \sin (x) \cos (x) (c+d x)+c x+\frac{d x^2}{2}-\frac{1}{4} d \sin ^2(x)+\frac{3}{4} d \cos ^2(x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4431
Rule 3310
Rubi steps
\begin{align*} \int (c+d x) \csc (x) \sin (3 x) \, dx &=\int \left (3 (c+d x) \cos ^2(x)-(c+d x) \sin ^2(x)\right ) \, dx\\ &=3 \int (c+d x) \cos ^2(x) \, dx-\int (c+d x) \sin ^2(x) \, dx\\ &=\frac{3}{4} d \cos ^2(x)+2 (c+d x) \cos (x) \sin (x)-\frac{1}{4} d \sin ^2(x)-\frac{1}{2} \int (c+d x) \, dx+\frac{3}{2} \int (c+d x) \, dx\\ &=c x+\frac{d x^2}{2}+\frac{3}{4} d \cos ^2(x)+2 (c+d x) \cos (x) \sin (x)-\frac{1}{4} d \sin ^2(x)\\ \end{align*}
Mathematica [A] time = 0.0198871, size = 34, normalized size = 0.83 \[ c x+c \sin (2 x)+\frac{d x^2}{2}+d x \sin (2 x)+\frac{1}{2} d \cos (2 x) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.048, size = 52, normalized size = 1.3 \begin{align*} 4\,d \left ( x \left ( 1/2\,\cos \left ( x \right ) \sin \left ( x \right ) +x/2 \right ) -1/4\,{x}^{2}-1/4\, \left ( \sin \left ( x \right ) \right ) ^{2} \right ) +4\,c \left ( 1/2\,\cos \left ( x \right ) \sin \left ( x \right ) +x/2 \right ) -{\frac{d{x}^{2}}{2}}-cx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.02177, size = 36, normalized size = 0.88 \begin{align*} \frac{1}{2} \,{\left (x^{2} + 2 \, x \sin \left (2 \, x\right ) + \cos \left (2 \, x\right )\right )} d + c{\left (x + \sin \left (2 \, x\right )\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.492165, size = 78, normalized size = 1.9 \begin{align*} \frac{1}{2} \, d x^{2} + d \cos \left (x\right )^{2} + 2 \,{\left (d x + c\right )} \cos \left (x\right ) \sin \left (x\right ) + c x \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 14.3026, size = 56, normalized size = 1.37 \begin{align*} c x + c \sin{\left (2 x \right )} - d x^{2} \sin ^{2}{\left (x \right )} - d x^{2} \cos ^{2}{\left (x \right )} + \frac{3 d x^{2}}{2} + 2 d x \sin{\left (x \right )} \cos{\left (x \right )} - d \sin ^{2}{\left (x \right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.0992, size = 36, normalized size = 0.88 \begin{align*} \frac{1}{2} \, d x^{2} + c x + \frac{1}{2} \, d \cos \left (2 \, x\right ) +{\left (d x + c\right )} \sin \left (2 \, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]